package teste.servico.ejb;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Remote;
import javax.ejb.Stateless;

import teste.servico.Projeto001ServicoLocal;
import teste.servico.Projeto002ServicoLocal;
import teste.servico.Projeto003Servico;
import teste.servico.Projeto003ServicoLocal;
import teste.servico.Projeto003ServicoRemote;


@Stateless
@Local(Projeto003ServicoLocal.class)
@Remote(Projeto003ServicoRemote.class)
public class Projeto003ServicoEJB extends ParentProjetoServicoEJB implements Projeto003Servico {

	@EJB
	private Projeto001ServicoLocal projeto001Servico;

	@EJB
	private Projeto002ServicoLocal projeto002Servico;

	
	public void facaAlgoAmplo() {
		try{
			System.out.println("facaAlgoAmplo() - start");
			System.out.println(projeto001Servico.inserirOperacaoFinanceira());
			projeto002Servico.recuperarOperacaoFinanceira();
			System.out.println("facaAlgoAmplo() - end");
		}catch(Exception e){
			e.printStackTrace();
			throw new RuntimeException(e.getMessage());
		}
	}

}
